<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../../global/css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./frm.css" />
    <style>
        /* app内，不显示跳到下载app的链接 */
        a[href*="/views/down/index.html"],
        a[href*="://a.app.qq.com/o/simple.jsp"] {
            display: none;
        }
    </style>
</head>
<body class="aui-hide">

    <div id="main" class="main aui-content common-user">
        <div class="content">

            <!--跑马灯内容-->
            <div class="wallet-marquee">
                <img src="../../../global/image/wallet/bell_yellow.png" class="wallet-marquee-icon" />
                <div id="wallet-marquee-container" class="wallet-marquee-container"></div>
            </div>

            <!--需要截图的内容-->
            <div id="screenshots">
	            <!--钱包面板内容-->
                <div class="wallet-panel-frame">
    	            <div class="wallet-panel">
    		            <div class="panel-top">
    			            <div class="panel-balance">
    				            <div class="panel-balance-title">当前余额：</div>
    				            <div class="panel-balance-detail">
    					            <div>¥ &nbsp; </div>
    					            <div id="wallet-amount" class="panel-balance-num">0</div>
    					            <div id="wallet-amount-decimal">.00</div>
    				            </div>
    			            </div>

    			            <div class="panel-action">
    				            <div class="panel-action-buttons">
    					            <div id="open-my-store" class="hidden" tapmode onclick="openMyStore();">金币兑换</div>
    					            <div tapmode onclick="jumpToDraw()">零钱提现</div>
    				            </div>
    				            <div tapmode onclick="upgradeAction();" id="user-wallet-upgrade" class="panel-upgrade">
    					            <img src="../../../global/image/wallet/gold-coin.png" class="panel-upgrade-icon" />
    					            <div class="panel-upgrade-desc">
    						            <div id="user-wallet-upgrade-tip">加入会员·每天多赚20元</div>
    						            <i class="aui-iconfont aui-icon-right"></i>
    					            </div>
    				            </div>
    			            </div>
    		            </div>
    		            <div id="wallet-panel-bottom" class="panel-bottom"></div>
    	            </div>
                </div>

	            <div class="wallet-chart">
		            <div class="wallet-chart-title">
			            <div class="line"></div>
			            <div class="text">过去7日零钱收益</div>
			            <div class="line"></div>
		            </div>
		            <div id="wallet-chart" class="chart"></div>
	            </div>
            </div>

            <div class="wallet-tab aui-card-list-content">
                <div id="wallet-tab-bar" class="aui-tab border-bottom">
                    <div class="aui-tab-item aui-active" data-type="1" tapmode onclick="walletTabAction(this);"><span>金币</span></div>
                    <div class="aui-tab-item" data-type="2" tapmode onclick="walletTabAction(this);"><span>零钱</span></div>
                </div>
            </div>

            <div id="wallet-tab-list" class="wallet-tab-list"></div>
        </div>
    </div>

    <div class="wallet-bottom border-top" id="footer">
        <div class="wallet-bottom-item first" data-from="my-wallet" tapmode onclick="views.openWalletIncomeListWin(this);">
            <img class="wallet-bottom-icon" src="../../../global/image/wallet/crown.png" />
            <div class="wallet-bottom-title">收入榜</div>
        </div>
        <div class="wallet-bottom-item last" tapmode onclick="showIncome();">
            <img class="wallet-bottom-icon" src="../../../global/image/wallet/share.png" />
            <div id="share-btn-title" class="wallet-bottom-title">晒收入赚金币</div>
        </div>
    </div>

    <script id="tpl-wallet-tab-item" type="text/x-dot-template">
        {{~it :v:i}}
        <div class="aui-tab-item" data-type="{{=v.type}}" tapmode onclick="walletTabAction(this);"><span>{{=v.title}}</span></div>
        {{~}}
    </script>

    <script id="tpl-wallet-bottom-item" type="text/x-dot-template">
        {{~it :v:i}}
        <div class="panel-bottom-item">
            <div>{{=v.title}}</div>
            <div id="{{=v.id}}" class="panel-bottom-detail">{{=v.content}}</div>
        </div>
        {{~}}
    </script>

    <script id="tpl-wallet-history-cell" type="text/x-dot-template">

        {{~it.list :v:i}}
        <div class="wallet-cell">
            <div class="wallet-cell-top">
                <div class="wallet-cell-title">{{=v.ItemSubject}}</div>
                <div class="wallet-cell-coin">
                    <div class="coin">{{=(v.RecordType == 1) ? '+' : '-'}}{{=v.Amount}}</div>
                    <div class="coin-title">{{=v.CurrencyText}}</div>
                </div>
            </div>
            <div class="wallet-cell-bottom">
                <div class="wallet-cell-subtitle">{{=v.ItemDescribe}}</div>
                <div class="wallet-cell-time">{{=v.CurrencyTime}}</div>
            </div>
        </div>
        {{~}}

    </script>

</body>

<script type="text/javascript" src="../../../config.js?time={$time}"></script>
<script type="text/javascript" src="../../../global/script/lib/api.js?time={$time}"></script>
<script type="text/javascript" src="../../../global/script/lib/doT.min.js"></script>
<script type="text/javascript" src="../../../global/script/lib/zepto.min.js"></script>
<script type="text/javascript" src="../../../global/script/lib/zepto.animate.js"></script>
<script type="text/javascript" src="../../../global/script/lib/echarts.min.js"></script>

<!-- showMoney.js依赖于下面js，请一起copy -->
<script type="text/javascript" src="../../../global/script/lib/arale-qrcode.js"></script>
<script type="text/javascript" src="../../../global/script/lib/es6-promise.auto.min.js"></script>
<script type="text/javascript" src="../../../global/script/lib/html2canvas.my.min.js"></script>
<script type="text/javascript" src="../../../global/script/libx/paintImage.js?time={$time}"></script>
<script type="text/javascript" src="../../../global/script/libx/showMoney.js?time={$time}"></script>

<script type="text/javascript" src="../../../global/script/lib/aui-lazyload.js"></script>
<script type="text/javascript" src="../../../global/script/mylib.js?time={$time}"></script>
<script type="text/javascript" src="../../../global/script/libx/dateUtil.js"></script>
<script type="text/javascript" src="../../../app.js?time={$time}"></script>
<script type="text/javascript" src="./frm.js?time={$time}"></script>

</html>


<script type="text/javascript" src="../../../global/script/_fakeApi.js"></script>

<script>
    apiready();

    $api.removeCls($api.dom("body"), 'aui-hide');

    userType = 1;
    renderUserTheme();

    raceList = [{"id":"0","title":"我是标题0","content":"","type":""},{"id":"1","title":"我是标题1","content":"","type":""},{"id":"2","title":"我是标题2","content":"","type":""},{"id":"3","title":"我是标题3","content":"","type":""},{"id":"4","title":"我是标题4","content":"","type":""}];
    renderTrack();
    startMarquee();

    if (myChart == undefined || myChart == null) {
        myChart = echarts.init(document.getElementById('wallet-chart'));
    }
    setCharts(["6/21","6/22","6/23","6/24","6/25","6/26", "6/27"], [5, 20, 36, 10, 10, 20, 33], userType);

    var main = $api.dom('body');
    $api.removeCls(main, 'common-user');
    // var clr1 = '#476dcb';
    // var clr2 = '#476dcb';

    // $api.addCls(main, 'member-user');
    // var clr1 = '#c44948';
    // var clr2 = '#f97576';

    $api.addCls(main, 'partner-user');
    var clr1 = '#46422b';
    var clr2 = '#46412b';

    $api.append($api.dom('body'), '<img id="showImage">');

    window.debug_in_chrome = 1;
    setTimeout(function() {

        fooShowMoney({
            themeClr: clr1,
            main: {
                domId: 'screenshots',
                t: 80,
            },
            header: {
                h: 220,
                quote: '是不是你最疼爱的人',
            },
            footer: {
                background: clr2
            }
        }, {
            succ: function(image, cover) {
                $api.addCls($api.byId("footer"), 'aui-hide');
                $api.byId("showImage").src = image;
            }
        });

    }, 1000);

    // paintImage(json, function (image) {
    //     $api.addCls($api.byId("footer"), 'aui-hide');
    //     $api.byId("showImage").src = image;
    // });

    var w = 375;
    var h = 640;
    var qW = 170;
    var qX = (w - qW) / 2;
    var qY = 251;
    var json = {
        w: w,
        h: h,
        content: [
            {
                type: 'img',
                url: '../../../global/image/wallet/invite-share.png',
                rect: {x:0, y: 0, w: w, h: h}
            },
            // {
            //     type: 'block',
            //     rect: {x:0, y: 500, w: 375, h: 60},
            //     content:[
            //         {
            //             type: 'text',
            //             content: '测试一下数据',
            //         },
            //         {
            //             type: 'avatar',
            //             url: '../../../global/image/noavatar_M.gif',
            //             rect: {x:0, y: 0, w: 72, h: 72}
            //         },
            //         {
            //             type: 'text',
            //             content: '测试一下数据',
            //             style: {
            //                 fontSize: '20px',
            //                 textAlign: 'center',
            //                 color: '#f7ff5d'
            //             }
            //         },
            //
            //     ]
            // },
            {
                type: 'avatar',
                url: '../../../global/image/noavatar_M.gif',
                rect: {x:152, y: 40, w: 72, h: 72}
            },
            {
                type: 'text',
                content: '我刚刚在这获得了65块钱的快乐',
                rect: {x: 0, y: 126, w: 375, h: 31},
                style:{
                    fontSize: '18px',
                    textAlign: 'center',
                    color: '#f8e69e'
                }
            },
            {
                type: 'text',
                content: '65.0',
                rect: {x: 0, y: 176, w: 375, h: 62},
                style:{
                    fontSize: '55px',
                    textAlign: 'center',
                    color: '#f8e69e'
                }
            },
            {
                type: 'img',
                url: '../../../global/image/wallet/yuan.png',
                rect: {x:250, y: 196, w: 100, h: 31}
            },
            {
                type: 'qcode',
                url: 'http://a.app.qq.com/o/simple.jsp?pkgname=com.ikongji.cocity.android',
                logo: '../../../global/image/logo.png',
                rect: {x: qX, y: qY, w: qW, h: qW},
                style: {
                    background: 'white',
                    foreground: 'black',
                    padding: 15,
                    radius: 10,
                    logoSize: 40,
                    logoRadius: 20
                }
            }
        ]
    };

</script>
